#include "PDTBoolConst.h"
#include "PDTCodeGraph.h"
#include "PDTZ3GraphVisitor.h" 

PDTBoolConst::PDTBoolConst(PDTCodeGraph & CG,bool value):PDTExpBoolSing(CG),PDTConst(){
    this->value=value;
    nValue = this;
	CG.addConst(this);
}

Z3_ast
PDTBoolConst::Z3NodeVisit (PDTZ3Visitor &ZV)
{
	if (Z3node != NULL)
		return Z3node;

	if (this->value)
		Z3node = Z3_mk_true(ZV.ctx);
	else if (!this->value)
		Z3node = Z3_mk_false(ZV.ctx);

	return Z3node;
}
